package com.example.musicplayer;

import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RadioButton;

/**
 * Created by asd on 2016/8/26.
 */
public class Fragment_1 extends Fragment implements View.OnClickListener {
    private RadioButton titleSinger;
    private RadioButton titleMessage;
    private RadioButton titleMusic;
    private RadioButton titleShopping;


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_1, null);
        init(view);
        MyListener();
        return view;

    }

    private void MyListener() {
        titleMessage.setOnClickListener(this);
        titleShopping.setOnClickListener(this);
        titleSinger.setOnClickListener(this);
        titleMusic.setOnClickListener(this);
    }

    private void init(View view) {
        titleSinger = (RadioButton) view.findViewById(R.id.title_singer);
        titleMessage = (RadioButton) view.findViewById(R.id.title_message);
        titleMusic = (RadioButton) view.findViewById(R.id.title_music);
        titleShopping = (RadioButton) view.findViewById(R.id.title_shopping);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.title_message:
                break;
            case R.id.title_music:
                break;
            case R.id.title_shopping:
                break;
            case R.id.title_singer:
                break;
        }
    }
}
